import request from '@/utils/request'
// 流程目录模块====================================================
// 添加流程目录
export function addWorkflowDirectory(data) {
  return request({
    url: '/api/workflowManage/workflowDirectory/addWorkflowDirectory',
    method: 'post',
    data
  })
}
// 删除流程目录
export function deleteWorkflowDirectory(params) {
  return request({
    url: '/api/workflowManage/workflowDirectory/deleteWorkflowDirectory',
    method: 'post',
    params
  })
}
// 获取流程目录详情
export function getWorkflowDirectoryDetail(data) {
  return request({
    url: '/api/workflowManage/workflowDirectory/getWorkflowDirectoryDetail',
    method: 'post',
    data
  })
}
// 获取流程目录列表
export function getWorkflowDirectoryList(params) {
  return request({
    url: '/api/workflowManage/workflowDirectory/getWorkflowDirectoryList',
    method: 'post',
    params
  })
}
// 获取流程目录树
export function getWorkflowDirectoryTree() {
  return request({
    url: '/api/workflowManage/workflowDirectory/getWorkflowDirectoryTree',
    method: 'post'
  })
}
// 更新流程目录
export function updateWorkflowDirectory() {
  return request({
    url: '/api/workflowManage/workflowDirectory/updateWorkflowDirectory',
    method: 'post'
  })
}
// 流程管理器模块=========================================
// 获取待办流程任务
export function getUpcomingWorkflowTasks(data) {
  return request({
    url: '/api/workflowManage/workflowManager/getUpcomingWorkflowTasks',
    method: 'post',
    data
  })
}
// 获取详情
export function getWorkflowDetail(params) {
  return request({
    url: '/api/workflowManage/workflowManager/getWorkflowDetail',
    method: 'post',
    params
  })
}
// 获取流程进度
export function getWorkflowSchedule(params) {
  return request({
    url: '/api/workflowManage/workflowManager/getWorkflowSchedule',
    method: 'post',
    params
  })
}
// 设置流程失败
export function setWorkflowFail(params) {
  return request({
    url: '/api/workflowManage/workflowManager/setWorkflowFail',
    method: 'post',
    params
  })
}
// 设置流程通过
export function setWorkflowPass(params) {
  return request({
    url: '/api/workflowManage/workflowManager/setWorkflowPass',
    method: 'post',
    params
  })
}
// 获取下一个流程
export function getNextWorkflow(params) {
  return request({
    url: '/api/workflowManage/workflowManager/getNextWorkflow',
    method: 'post',
    params
  })
}
// 开始流程
export function startWorkflow(params) {
  return request({
    url: '/api/workflowManage/workflowManager/startWorkflow',
    method: 'post',
    params
  })
}
// 定义流程模块============================================================
// 添加定义流程
export function addDefineWorkflow(data) {
  return request({
    url: '/api/workflowManage/defineWorkflow/addDefineWorkflow',
    method: 'post',
    data
  })
}
// 删除定义流程
export function deleteDefineWorkflow(params) {
  return request({
    url: '/api/workflowManage/defineWorkflow/deleteDefineWorkflow',
    method: 'post',
    params
  })
}
// 获取定义流程详情
export function getDefineWorkflowDetail(params) {
  return request({
    url: '/api/workflowManage/defineWorkflow/getDefineWorkflowDetail',
    method: 'post',
    params
  })
}
// 获取定义流程列表
export function getDefineWorkflowList(data) {
  return request({
    url: '/api/workflowManage/defineWorkflow/getDefineWorkflowList',
    method: 'post',
    data
  })
}
// 更新定义流程
export function updateDefineWorkflow(data) {
  return request({
    url: '/api/workflowManage/defineWorkflow/updateDefineWorkflow',
    method: 'post',
    data
  })
}
// 新增流程模块================================
// 添加新增流程
export function addAddWorkflow(data) {
  return request({
    url: '/api/workflowManage/addWorkflow/addAddWorkflow',
    method: 'post',
    data
  })
}
// 删除新增流程
export function deleteAddWorkflow(params) {
  return request({
    url: '/api/workflowManage/addWorkflow/deleteAddWorkflow',
    method: 'post',
    params
  })
}
// 获取新增流程详情
export function getAddWorkflowDetail(params) {
  return request({
    url: '/api/workflowManage/addWorkflow/getAddWorkflowDetail',
    method: 'post',
    params
  })
}
// 获取新增流程列表
export function getAddWorkflowList(data) {
  return request({
    url: '/api/workflowManage/addWorkflow/getAddWorkflowList',
    method: 'post',
    data
  })
}
// 更新新增流程
export function updateAddWorkflow(data) {
  return request({
    url: '/api/workflowManage/addWorkflow/updateAddWorkflow',
    method: 'post',
    data
  })
}
